<?php  
class TestController extends AppController 
{ 
  var $name = 'Test'; 
  var $components = array('Acl'); 
  var $uses = array('User'); 
  var $curLoggedInUserId = 3; 

  function view() 
  {  
    $aroAlias = 'User::'.$this->curLoggedInUserId; 
    $acoAlias = 'User::5'; 

    if ($this->Acl->check($aroAlias, $acoAlias, 'read')) 
    { 
       echo 'Read access allowed for User Id'.$this->curLoggedInUserId; 
    } 
    else 
    { 
       echo 'Read access denied for User Id'.$this->curLoggedInUserId; 
    } 
  } 
} 
?>